#ifndef GRAPHICS_H
#define GRAPHICS_H

#include "d3dUtil.h"
#include "Renderer.h"

namespace mgfx
{
	class Graphics
	{
	public:
		Graphics();
		~Graphics();

		void resetOMTargetsAndViewport();

		void init(HWND hwnd, int clientWidth, int clientHeight);
		void onResize();
		void drawScene();

		void updateTimer(float dt);

	private:
		void initDirect3D();

		Renderer mRenderer;

		HWND mhMainWnd;

		std::wstring mFrameStats;
 
		ID3D10Device*    mDevice;
		IDXGISwapChain*  mSwapChain;
		ID3D10Texture2D* mDepthStencilBuffer;
		ID3D10RenderTargetView* mRenderTargetView;
		ID3D10DepthStencilView* mDepthStencilView;
		ID3DX10Font* mFont;

		D3D10_DRIVER_TYPE md3dDriverType;
		XMCOLOR4F mClearColor;
		int mClientWidth;
		int mClientHeight;
	};


}


#endif